# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=laz-perf
pkgver=3.0.0
pkgrel=0
pkgdesc="Alternative LAZ implementation for C++ and JavaScript"
url="https://github.com/hobu/laz-perf"
# armhf, armv7: io_test segfaults
# s390x: broken on big endian
arch="all !armhf !armv7 !s390x"
license="LGPL-2.0-or-later"
depends_dev="$pkgname"
makedepends="
	cmake
	python3-dev
	samurai
	"
subpackages="$pkgname-dev"
source="https://github.com/hobu/laz-perf/archive/$pkgver/laz-perf-$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DWITH_TESTS=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
57fcbf661c306b01f86254c4471de68f7359d050cc562ff549ab3560f54f9a4455624740335009d2dfd6d9b3298c4742198106886ba1b0c97d4dfdeddeb180c0  laz-perf-3.0.0.tar.gz
"
